package com.lw.spring.springframework.aspect;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * 切面类
 * @author lenovo
 *
 */
public class MyAspect implements MethodInterceptor {

	@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		check_Permissions();
		//执行目标方法
		Object obj = invocation.proceed();
		log();
		return obj;
	}

	public void check_Permissions(){
		System.out.println("模拟检查权限....");
	}
	public void log(){
		System.out.println("模拟日志增加....");
	}
}
